//
//  FoodMaterialTableViewCell.m
//  FoodList
//
//  Created by lanou on 16/4/8.
//  Copyright © 2016年 王金晶. All rights reserved.
//

#import "FoodMaterialTableViewCell.h"
#import <UIImageView+WebCache.h>
@implementation FoodMaterialTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


-(void)setModel:(FoodMaterialModel *)model
{
    _model = model;
    [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.image]];
    _nameLabel.text = model.title;
    _gongxiaoLabel.text = model.gongxiao[0];
    _gongxiaoLabel2.text = model.gongxiao[1];
    _heatLabel.text = model.heat_word;
    if ([_heatLabel.text isEqualToString:@"较低热量"]) {
        _heatLabel.textColor = [UIColor greenColor];
    }else if ([_heatLabel.text isEqualToString:@"较高热量"]){
        _heatLabel.textColor = [UIColor redColor];
    }else
    {
        _heatLabel.textColor = [UIColor yellowColor];
    }
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
